package com.tedu.api.list;

import org.junit.Test;

import java.util.ArrayList;
import java.util.Collection;

public class HomeWork {
    @Test
    public void testHomeWork(){
        Collection<String> c=new ArrayList<>();
        c.add("十一");c.add("元旦");c.add("春节");c.add("元宵节");
        for(String str:c){
            if("元旦".equals(str)){
                c.remove("元旦");
            }
            System.out.println("增强for:"+str);
        }
        System.out.println("打印集合："+c);
    }
}
